GrapeCity.Xaml.SpreadSheet.Data
SetArray(Int32,Int32,Object[,],Boolean) Method
Example 


Row index
Column index
Array from which to set values
If true, set formulas; otherwise, set values.
Sets the values in the specified two-dimensional array of objects into the specified range of cells on this sheet.
Syntax
'Declaration
 
Public Overloads Sub SetArray( _
   ByVal row As Integer, _
   ByVal column As Integer, _
   ByVal value(,) As Object, _
   ByVal formula As Boolean _
) 
'Usage
 
Dim instance As Worksheet
Dim row As Integer
Dim column As Integer
Dim value() As Object
Dim formula As Boolean
 
instance.SetArray(row, column, value, formula)
public void SetArray( 
   int row,
   int column,
   object[,] value,
   bool formula
)

Parameters

row
Row index
column
Column index
value
Array from which to set values
formula
If true, set formulas; otherwise, set values.
Example
This example uses the SetArray method.
object[,] arr;
gcSpreadSheet1.ActiveSheet.SetArray(1, 0, new String[,] { { "One", "Two" } });
gcSpreadSheet1.ActiveSheet.SetArray(2, 1, new String[,] { { "Three", "Four" } }, false);
arr = gcSpreadSheet1.ActiveSheet.GetArray(1, 0, 3, 2);
gcSpreadSheet1.ActiveSheet.Cells[3, 3].Text = "The value of the first element in the array is " + arr.GetValue(0, 0).ToString();
Dim arr(,) As Object
GcSpreadSheet1.ActiveSheet.SetArray(1, 0, New String(,) {{"One", "Two"}})
GcSpreadSheet1.ActiveSheet.SetArray(2, 1, New String(,) {{"Three", "Four"}}, False)
arr = GcSpreadSheet1.ActiveSheet.GetArray(1, 0, 3, 2)
GcSpreadSheet1.ActiveSheet.Cells(3, 3).Text = "The value of the first element in the array is " & arr.GetValue(0, 0).ToString()
Requirements

Target Platforms: Windows Server 2012, Windows RT

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options